home *** CD-ROM | disk | FTP | other *** search
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
- <html>
- <head>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
- <style media="screen" type="text/css"><!--
- td { valign: top; color: black; font-size: 11px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular }
- div { color: black; font-size: 11px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular }
- input { color: black; font-size: 11px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular }
- option { color: black; font-size: 11px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular }
- select { color: black; font-size: 11px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular }
- #newCoversheet { position: absolute; z-index: 10; top: 10px; left: 10px; width: 59px; height: 90px; visibility: visible }
- .errorMessage { color: red; font-weight: bold; font-size: 11px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular }
- --></style>
-
- <%@ LANGUAGE = VBScript %>
- <%
- if Application("PubTypesPath")="" then
- Dim Vroot,iCount,idx
- Vroot = Server.MapPath("Default.asp")
- iCount = 0
- idx = InStrRev(Vroot, "\")
- if (idx > 0) and (idx < len(Vroot)) then
- Vroot = Left(Vroot,idx-1)
- end if
- Application("PubTypesPath")=Vroot & "\PubTypes"
- Application("XMLDirectory")=Vroot & "\XMLBATCH"
- Application("SiteIDFile")=Vroot & "\siteid.txt"
- Application("LogFile")=Vroot & "\csweblog.txt"
- end if
-
- if Request.Form("BatchClassID")="" then
- ' response.redirect("Default.asp?lang=" & Request.QueryString("lang"))
- response.redirect("Default.asp")
- end if
- '---------------------------------------------------------------------------------------------------
- 'Getting static information
- '---------------------------------------------------------------------------------------------------
-
- Function CorrectStr(StrIn)
- Dim StrOut
- StrOut=replace(StrIn,"<","<")
- StrOut=replace(StrOut,">",">")
- CorrectStr=replace(StrOut,chr(13),"<br>")
- End Function
- Function ConvertStr(StrIn)
- Dim StrOut
- StrOut=replace(StrIn,"´",chr(39))
- StrOut=replace(StrOut,""",chr(34))
- ConvertStr=StrOut
- End Function
-
-
- '---------------------------------------------------------------------------------------------------
- 'Getting local strings
- '--------------------------------------------------------------------------------------------------
- dim oConn,oRs,sFilePath,sLangTable
- dim display(21)
- On Error Resume Next
- set oConn = Server.CreateObject("ADODB.Connection")
- sFilePath=Server.MapPath("csuiweb.mdb")
-
- oConn.Open("Driver={Microsoft Access Driver (*.mdb)};DBQ=" & sFilePath & ";")
- if err then
- set oConn=nothing
- err.clear
- Response.Redirect("Error.asp?Err=1")
- end if
- sLangTable=mid(Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"),1,2)
- if trim("" & sLangTable)="" then
- sLangTable="En"
- end if
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=0")
- if (err and (Err.Number=-2147217865)) then
- err.Clear
- sLangTable="En"
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=0")
- end if
- Response.Write("<META HTTP-EQUIV='CONTENT-LANGUAGE' CONTENT='" & oRS("Value") & "'>")
-
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id between 1 and 2 ")
- 'Full p name
- display(0)=oRs("Value")
- oRs.moveNext
- 'Short pro name
- display(1)=oRs("Value")
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=9")
- 'Coversheet
- display(2)=oRs("Value")
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id between 11 and 12")
- 'Important
- display(3)=oRs("Value")
- 'This...expiration...
- oRs.moveNext
- display(4)=oRs("Value")
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id =14")
- 'This ...MFP.....
- display(5)=oRs("Value")
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id =21")
- 'Create new coversheet
- display(6)=oRs("Value")
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id =23")
- 'Midnight...
- display(7)=oRs("Value")
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id =24")
- 'barcode data
- display(8)=oRs("Value")
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id =25")
- 'Create date
- display(9)=oRs("Value")
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id =26")
- 'Expiration date
- display(10)=oRs("Value")
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id =22")
- 'Document type
- display(11)=oRs("Value")
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id =27")
- 'Document name
- display(12)=oRs("Value")
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id =28")
- 'Site ID
- display(13)=oRs("Value")
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id =29")
- 'Site name
- display(14)=oRs("Value")
- 'Error on getting published data.ActiveX can not create component.
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=37")
- display(15)=oRs("Value")
- 'Error on updating data.
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=38")
- display(16)=oRs("Value")
- 'Error on generating XML file
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=39")
- display(17)=oRs("Value")
- 'Error on opening siteid.txt file
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=40")
- display(18)=oRs("Value")
- 'Error on getting SiteID information
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=41")
- display(19)=oRs("Value")
- 'Error on creating FileSystemObject component.
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=42")
- display(20)=oRs("Value")
- 'Client IP
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=46")
- display(21)=oRs("Value")
-
- oRs.Close
- oConn.Close
- if err then
- err.clear
- Response.Redirect("Error.asp?Err=1")
- end if
- %>
- <title><%=display(1) & " " & display(2)%></title>
- <%
-
- '------------------------------------------------------------------------------------------
- 'Generating unique file name
- 'A file name contains 5 parts
- 'two chars:day, two chars:hour, two chars: minute, two chars: second, ten chars: SessionID
- '------------------------------------------------------------------------------------------
- Dim sep,inputStr,DocumentType,SiteID,SiteName
- Dim fso, f,XMLFilePath
- dim myDay,myHour,myMinute,mySecond,myTime
- dim XMLFileName,nB,nD,nF,nTemp
- dim oXMLGen,oXMLUI
- myTime=now
- myDay="" & day(date)
- myDay= string(2-len(myDay),"0") & myDay
- MyHour = "" & hour(myTime)
- MyHour=string(2-len(myHour),"0") & myHour
- MyMinute = "" & minute(myTime)
- MyMinute=string(2-len(myMinute),"0") & myMinute
- MySecond ="" & Second(myTime)
- MySecond=string(2-len(mySecond),"0") & mySecond
- XMLFileName=MyDay & myHour & myMinute & mySecond & string(10-len(Session.SessionID)," ") & Session.SessionID
- XMLFilePath=Application("XMLDirectory") & "\" & XMLFileName & ".xml"
-
- '--------------------------------------------------------------------------------------------
- 'getting Site ID,Site Name from siteid.txt file
- '--------------------------------------------------------------------------------------------
- Set fso = Server.CreateObject("Scripting.FileSystemObject")
- if err then
- response.write("<table><tr><td class='errorMessage'>" & display(20) & "</td></tr></table>")
- err.clear
- response.end
- end if
- set f =fso.OpenTextFile(Application("SiteIDFile"))
- if err then
- response.write("<table><tr><td class='errorMessage'>" & display(18) & "</td></tr></table>")
- err.clear
- response.end
- end if
-
- SiteID=f.ReadLine
- if err then
- response.write("<table><tr><td class='errorMessage'>" & display(19) & "</td></tr></table>")
- err.clear
- response.end
- end if
- SiteName=f.ReadLine
- if err then
- err.clear
- SiteName=""
- end if
- f.Close
- set fso=nothing
-
- '--------------------------------------------------------------------------------------------
- 'Generating a XML file for import session
- '--------------------------------------------------------------------------------------------
-
- Dim nBatchClassID,nPriority,nBatchFieldNumber,nIndexFieldNumber,sBatchClassName,sBatchName
-
- nBatchClassID=0 + Request.Form("BatchClassID")
- nBatchFieldNumber=0 + Request.Form("BatchFieldNumber")
- nPriority=0 + Request.Form("Priority")
- nIndexFieldNumber=0 + Request.Form("IndexFieldNumber")
- nFixedPageCount=0 + Request.Form("FixedPageCount")
- set oXMLGen=CreateObject("RCXMLWEB.RCXMLGen")
- if err then
- response.write("<table><tr><td class='errorMessage'>" & display(15) & "</td></tr></table>")
- err.Clear
- Response.End
- end if
- sBatchClassName="" & Request.Form("BatchClassName")
- sBatchName="" & Request.Form("DocumentName")
-
- Call oXMLGen.SetBatch(sBatchName,sBatchClassName,nBatchClassID,nPriority)
- Call oXMLGen.AddDocument("" & Request.Form("DocumentClassName"),"" & Request.Form("FormTypeName"),nFixedPageCount)
- if nBatchFieldNumber>0 then
- if nBatchFieldNumber=1 then
- call oXMLGen.AddBatchField("" & Request.Form("BatchFieldName"),"" & Request.Form("BatchFieldValue"))
- else
- for nTemp=1 to nBatchFieldNumber
- call oXMLGen.AddBatchField(Request.Form("BatchFieldName")(nTemp),Request.Form("BatchFieldValue")(nTemp))
- next
- end if
- end if
- if nIndexFieldNumber=1 then
- call oXMLGen.AddIndexField(ConvertStr(Request.Form("IndexFieldName")),ConvertStr(Request.Form("IndexFieldValue")))
- else
- for nTemp=1 to nIndexFieldNumber
- call oXMLGen.AddIndexField(ConvertStr(Request.Form("IndexFieldName")(nTemp)),ConvertStr(Request.Form("IndexFieldValue")(nTemp)))
- next
- end if
- if err then
- response.write("<table><tr><td class='errorMessage'>" & display(16) & "</td></tr></table>")
- Response.End
- end if
-
- if oXMLGen.WriteXML("" & XMLFilePath)<0 then
- response.write("<table><tr><td class='errorMessage'>" & display(17) & "</td></tr></table>")
- Set fso = CreateObject("Scripting.FileSystemObject")
- set f =fso.OpenTextFile(Application("LogFile"),8,true)
- f.WriteLine oXMLGen.ErrMessage
- f.Close
- set fso=nothing
- set oXMLGen=nothing
- Response.End
- end if
- set oXMLGen=nothing
- on error goto 0
- '--------------------------------------------------------------------------------------------------
- 'End of generating a XML file for import session
- '--------------------------------------------------------------------------------------------------
- DocumentType=Request.Form("BatchClassName") & "-" & Request.Form("DocumentClassName") & Request.Form("FormTypeName")
- %>
- </head>
-
- <body>
-
- <center>
- <table cellpadding="1" cellspacing="1" width="600px">
- <tr>
- <td width="72px" rowspan="2" valign="midle" align="center">
- <a href="Default.asp"><img src="images/newCS_icon.gif" width="59" height="59" border="0"><br>
- <%=display(6)%>!</a></div>
- </td>
- <td colspan="2" rowspan="2" align="center" valign="middle" width="228px"><img src="images/logo1.jpg" width="215" height="52" ALT='<%=display(0)%>'>
- </td>
- <!--------------------------Filename Barcode --------------------------------------------->
- <td width="300px" colspan="2" align="center" >
- <img src='processing.asp?text=<%=XMLFileName%>' alt='<%=display(0) & " " & display(8)%>'>
- </td>
- </tr>
- <!--------------------------SiteID Barcode --------------------------------------------->
- <tr>
- <td width="300px" colspan="2" align="center" >
- <img src='processing.asp?text=<%=SiteID%>' alt='<%=display(0) & " " & display(8)%>'>
- </td>
- </tr>
- <!--------------------------Creating date time--------------------------------------------->
- <tr>
- <td align="right" width="126px" colspan="2" valign="top" ><b><%=display(9)%></b> </td>
- <td align="left" width="174px" ><%=formatdatetime(date,vbLongDate)%></td>
- <!----------------------------------------------------------------------------------->
- <td align="left" valign="midle" colspan="3" rowspan="2">
- <b><%=display(3)%>:</b> <%=display(4)%>
- </td>
- </tr>
- <!--------------------------Expiration date time--------------------------------------------->
- <tr>
- <td align="right" colspan="2" valign="top"><b><%=display(10)%></b> </td>
- <td align="left" valign="top"><%=display(7) & formatdatetime(date,vbLongDate)%></td>
- </tr>
- <!--- ----------------------Client IP----------------------------------------------------- --->
- <tr>
- <td align="right" colspan="2" valign="top"><b><%=display(21)%></b> </td>
- <td align="left" valign="top"><%=Request.ServerVariables("REMOTE_ADDR")%></td>
- </tr>
- <tr>
- <td colspan="5" align="center"><hr color="Black" size="1" width="90%"> </td>
- </tr>
- <!--------------------------Document type--------------------------------------------->
- <tr>
- <td align="right" colspan="2"><b><%=display(11)%></b> </td>
- <td colspan="3" align="left"><%=Request.Form("BatchClassName") & " - " & Request.Form("DocumentClassName") & " - " & Request.Form("FormTypeName")%></td>
- </tr>
- <!--------------------------Document Name--------------------------------------------->
- <!---
- <tr>
- <td align="right" colspan="2"><b><%=display(12)%></b></td>
- <td colspan="3" align="left"> <%=CorrectStr("" & Request.Form("DocumentName"))%></td>
- </tr>
- --->
- <!--------------------------Site ID--------------------------------------------->
- <tr>
- <td align="right" colspan="2"><b><%=display(13)%></b> </td>
- <td colspan="3" align="left"><%=CorrectStr(SiteID)%></td>
- </tr>
- <!--------------------------Site Name--------------------------------------------->
- <%
- if trim(SiteName)<>"" then
- %>
- <tr>
- <td align="right" colspan="2"><b><%=display(14)%></b> </td>
- <td colspan="3" align="left"><%=CorrectStr(SiteName)%></td>
- </tr>
- <%
- end if
- %>
-
- <tr>
- <td colspan="5" align="center"><hr color="Black" size="1" width="90%"> </td>
- </tr>
- <!--------------------------Index Fields --------------------------------------------->
- <%
- if nIndexFieldNumber=1 then
- %>
- <tr>
- <td colspan="3" align="right" valign="top"><b><%=CorrectStr(Request.Form("IndexFieldName"))%>:</b> </td>
- <td colspan="2" align="left" valign="top"><%=CorrectStr(Request.Form("IndexFieldValue"))%></td>
- </tr>
-
- <%
- elseif (nIndexFieldNumber <4) and (nIndexFieldNumber>1) then
- for nTemp=1 to Request.Form("IndexFieldName").Count
- %>
- <tr>
- <td colspan="3" align="right" valign="top"><b><%=CorrectStr(Request.Form("IndexFieldName")(nTemp))%>:</b> </td>
- <td colspan="2" align="left" valign="top"><%=CorrectStr(Request.Form("IndexFieldValue")(nTemp))%></td>
- </tr>
- <%
- next
- else
- for nTemp=1 to nIndexFieldNumber
- if (nTemp mod 2)=1 then
- %>
- <tr>
- <td align="right" colspan="2" valign="top" ><b><%=CorrectStr(Request.Form("IndexFieldName")(nTemp))%>:</b> </td>
- <td align="left" valign="top"><%=CorrectStr(Request.Form("IndexFieldValue")(nTemp))%></td>
- <%
- else
- %>
- <td align="right" width="126px" valign="top" ><b><%=CorrectStr(Request.Form("IndexFieldName")(nTemp))%>:</b> </td>
- <td align="left" width="174px" valign="top"><%=CorrectStr(Request.Form("IndexFieldValue")(nTemp))%></td>
- </tr>
- <%
- end if
- next
- end if
- %>
- <tr>
- <td colspan="5" align="center"><hr color="Black" size="1" width="90%"> </td>
- </tr>
- <tr>
- <td colspan="5" valign="middle" align="center"><%=display(5)%></td>
- </tr>
-
- </table>
- </center>
- </body>
- </html>
-